import React from "react";
import { NavBar, Toast, PasswordInput, Dialog } from "react-vant";
import { useNavigate } from "react-router-dom";

const Index: React.FC = () => {
  const navigate = useNavigate();
  const onSubmit = (val) => {
    Dialog.alert({
      message: val,
    });
  };
  return (
    <div>
      <NavBar
        title="钱包设置"
        leftText="返回"
        rightText="设置"
        onClickLeft={() => navigate(-1)}
        onClickRight={() => Toast("设置")}
      />
      <PasswordInput onSubmit={onSubmit} />
    </div>
  );
};

export default Index;
